home *** CD-ROM | disk | FTP | other *** search
- C Cross Referencing & Documenting tool Version 1.4 - cxref-cpp
- ==============================================================
-
- This is a copy of the gcc-2.7.2 pre-processor with some modifications to make
- cxref work better.
-
- The files are modified in the following way.
-
- cccp.c - Hacked about a bit (the changes are in cccp.c.diff).
- cexp.y - As original.
- version.c - As original.
- pcp.h - As original.
- config.h - A simple version that should work in most cases.
- tm.h - A simple version that should work in most cases.
-
-
- Configuration
- -------------
-
- There is a configuration script that should be used to configure cxref-cpp. Run
- 'make configure', only if this fails then you should read further.
-
-
- Makefile.cpp
- ------------
-
- This file contains all of the configuration that is needed to compile the
- cxref-cpp program. The information in this file is generated by the script
- config-cpp (make configure).
-
- This has a number of variables that are used when compiling cxref-cpp.
-
- PREDEFINES The parameters that cpp has compiled in as defaults.
-
- INCLUDE_DIR[123] The location of the include files.
-
- SVR4_STRINGS Do we need SVR4 string functions.
-
- CONFIG_STATUS The status of the configuration.
-
-
- CONFIG_STATUS
- -------------
-
- This contains the reason for configuration failure. a non-zero string will cause
- the Makefile to not build cxref-cpp.
-
-
- SVR4_STRINGS
- ------------
-
- Set to a non-zero value if we need to use the functions memset etc. instead of
- bzero etc., typically on SVR4 machines.
-
-
- config.h & tm.h
- ---------------
-
- The files config.h and tm.h that are supplied are trivial. They only need to
- contain a small information about the target system. This is basically the
- number of bits that are used for different data types.
-
- If you need to edit either of these files to build cxref-cpp, please tell me how
- the machine can be identified (what #defines) and what needs to be changed.
-
-
- PREDEFINES and INCLUDE_DIR[123]
- -------------------------------
-
- [Note that what follows applies to gcc, other compilers may be different]
-
- The cxref-cpp program needs to have the same include directories and predefined
- macros built in to the program as gcc. This is so that cxref-cpp and gcc have
- the same behaviour when processing the source files.
-
- Use `gcc -E -v -dM - < /dev/null' to see the list of include paths and
- predefined macros.
-
- Those marked `->' below are important.
-
- | Reading specs from /usr/lib/gcc-lib/i486-linux/2.5.8/specs
- | gcc version 2.5.8
- C -> | /usr/lib/gcc-lib/i486-linux/2.5.8/cpp -lang-c -v -undef \
- -D__GNUC__=2 -D__GNUC_MINOR__=5 -Dunix -Di386 -Dlinux -D__unix__ \
- -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -D__i486__ \
- -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386) \
- -dM -
- | GNU CPP version 2.5.8 (80386, BSD syntax)
- | #include "..." search starts here:
- | #include <...> search starts here:
- I1-> | /usr/local/include
- I2-> | /usr/i486-linux/include
- I3-> | /usr/lib/gcc-lib/i486-linux/2.5.8/include
- | /usr/include
- | End of search list.
- | #define __linux__ 1
- | #define linux 1
- | #define __i386__ 1
- | #define __i386 1
- | #define __GNUC_MINOR__ 5
- | #define __i486__ 1
- | #define i386 1
- | #define __unix 1
- | #define __unix__ 1
- | #define __GNUC__ 2
- | #define __linux 1
- | #define unix 1
-
-
- C The command line that is used when gcc calls cpp. Notice that it includes
- a number of flags that change the default action of cpp. (Try doing
- 'cpp -v -dM - < /dev/null' to see the difference.)
- Note the -D... and -A... command line flags, the PREDEFINES variable in
- Makefile.cpp needs to be set equal to these.
-
- I* The include files that are built into the cpp program.
- Add these to the makefile as described below:
-
- I1 => INCLUDE_DIR1
- I2 => INCLUDE_DIR2
- I3 => INCLUDE_DIR3
-
-
- Testing
- -------
-
- When cxref-cpp has been made use 'cxref-cpp -v -dM - < /dev/null' and check that
- the include directories and predefines are the same as those for gcc by using
- 'gcc -E -v -dM - < /dev/null'.
-
- If there are differences then it is possible that the cxref-cpp program will
- fail even though the source file is legal.
-